Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit Precision of Time values written to Migrations table #256

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

caseybrown89
Copy link

@caseybrown89 caseybrown89 commented Nov 3, 2023

I am using a database (SingleStore) that can't support more than 6 milliseconds of precision when inserting timestamp values into its database. When migrations are executed, the insert into the tracking table fails. This PR introduces a limit precision option that rounds timestamps prior to their insertion into the migrations table.

I added test coverage on the sql-parse/config.go (both my functionality and previously existing).

If this is too specific, the limit precision option could be modified to provide a variable rounding option so that it's more adaptable/reusable to other scenarios (I know it's a bit niche atm)

@caseybrown89
Copy link
Author

@rubenv what can I do to help get this over the line? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant